package cn.ht.jywrwater.module.ht.controller.admin.waterdevices.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.ht.jywrwater.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 设备 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class WaterDevicesBaseVO {

    @Schema(description = "设备号")
    private String deviceCode;

    @Schema(description = "地址描述")
    private String address;

    @Schema(description = "所属")
    private String belongTo;

    @Schema(description = "用户")
    private String customerCode;

    @Schema(description = "村庄")
    private String village;

    @Schema(description = "供水站")
    private String waterStation;

    @Schema(description = "经度")
    private BigDecimal lat;

    @Schema(description = "纬度")
    private BigDecimal lng;

    @Schema(description = "承建单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "承建单位不能为空")
    private String contractor;

    @Schema(description = "联系电话")
    private String customerTel;

    @Schema(description = "安装时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime installationTime;

    @Schema(description = "单位")
    private Integer samplingUnit;

    @Schema(description = "类型", example = "1")
    private Integer deviceType;

    @Schema(description = "关联告警")
    private String alertCode;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态不能为空")
    private Byte useStatus;

    @Schema(description = "备注", example = "随便")
    private String remark;

}
